<template>
   <div >
     <span>{{ goodsname }}</span>
     <button @click="jia(ind)">+</button>
     <span>{{ count }}</span>
     <button @click="jian(ind)">-</button>
   </div>
</template>

<script>
export default {
  // 接受父级组件变量  商品名,索引,数量
  props : ['goodsname',"ind",'count'],
//方法
methods: {
  jia(ind){
    this.$emit('jiaa',ind)
  },
  jian(ind){
this.$emit('jiann',ind)
  }
},
}
</script>

<style scoped>
</style>

